﻿@using TjZheng.Logger.DataEntity;
@inherits CMSWebViewPage<LogModule>
@{
    ViewBag.Title = "日志模块编辑页";
    Layout = "~/Views/Shared/_EditLayout.cshtml";
}
<div class="easyui-layout" data-options="fit:true">
    <div data-options="region:'center',border:false">
        <div class="top-block">
            <div id="toolbar_logmodule" class="datagrid-toolbar top-tool">
                @CurrentButtonTool.Create()
                @*                <a onclick="Save();" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true">保存</a>
                <a onclick="Back();" class="easyui-linkbutton" data-options="iconCls:'icon-back',plain:true">返回</a>*@
            </div>
        </div>
        <form id="fr_logmodule" method="post">
            @*@Html.AntiForgeryToken()*@
            <table class="tblContent">
                <colgroup>
                    <col class="colTitle">
                    <col class="colContent" />
                </colgroup>
                <tr>
                    <td><span class="txtNoNull">*</span>模块名称:</td>
                    <td>
                        @Html.Hidden("objProvide.Id", Model.Id, false)
                        @Html.StringBox("objProvide.ModuleName", Model.ModuleName, true, "请输入模块名称", null, ValidType.Length(64))
                    </td>
                </tr>
                <tr>
                    <td><span class="txtNoNull">*</span>模块代码:</td>
                    <td>
                        @Html.StringBox("objProvide.ModuleCode", Model.ModuleCode, true, "请输入模块代码", null, ValidType.Length(64))
                    </td>
                </tr>
            </table>
        </form>
    </div>
</div>
@section Bottom{
    <script type="text/javascript">
        function Save() {
            var objFormEntity = new FormEntity("#fr_logmodule");
            objFormEntity.url = "/logmodule/save/";
            objFormEntity.submiting = function () {
                return $(objFormEntity.selector).form('validate');
            };
            objFormEntity.submitSuccess = function (InvokeResult) {
                if (InvokeResult.ResultCode == "Success") {
                    ShowMessage(InvokeResult.ResultMessage);
                    history.back();
                } else {
                    ShowMessage(InvokeResult.ResultMessage);
                }
            };
            objFormEntity.isClearData = false;
            objFormEntity.submit();
        }
        function Back() {
            history.back();
        }
    </script>
}
